package cn.amebius.simpledocker.entity.po;

import cn.amebius.simpledocker.exception.DataErrorException;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * tb_permission的Po
 * @author 阿伟
 * @date 2023/7/31 13:35
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PermissionPo extends BasePo{

    private String name;

    private String description;
    public static void check(PermissionPo pp) {
        if (pp == null || pp.name.isEmpty() || pp.description.isEmpty()) {
            throw new DataErrorException("数据异常:权限丢失");
        }
        BasePo.check(pp);
    }

}
